package org.bravof.differ.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.bravof.differ.entity.DetailPO;
import org.bravof.differ.query.Query;

import java.util.List;

@Mapper
public interface DetailDAO {
    /**
     * 条件查询
     * @param query
     * @param offset
     * @param max
     * @return
     */
    List<DetailPO> findDetailListByQuery(@Param("query") Query query, @Param("offset") long offset, @Param("max") long max);

    /**
     * 根据ID查找
     * @param id
     * @return
     */
    DetailPO findDetailById(@Param("id") String id);

    /**
     * 新增配置
     * @param detail
     * @return
     */
    int addDetail(DetailPO detail);

    /**
     * 更新配置
     * @param detail
     * @return
     */
    int updateDetail(DetailPO detail);

    int deleteDetail(Integer id);
}
